package PTA.Pta_ch02;
import java.util.Scanner;
public class ex19 {
    public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
           int a=sc.nextInt();
            int y;//英尺
           int f = (int)(12*a/30.48);
           y = f/12;
           f = f%12;
        System.out.println(y+" "+f);



    }
}
